﻿Public Class CallEntry
    
    Private _Name As String
    Public Property Name() As String
        Get
            Return _Name
        End Get
        Set(ByVal value As String)
            _Name = If(String.IsNullOrEmpty(value), "(Unknown)", value)
        End Set
    End Property

    Private _Number As String
    Public Property Number() As String
        Get
            Return _Number & If(String.IsNullOrEmpty(Me.NameType), "", " (" & Me.NameType & ")")
        End Get
        Set(ByVal value As String)
            _Number = value
        End Set
    End Property

    Private _StartTime As String
    Public Property StartTime() As String
        Get
            Return _StartTime
        End Get
        Set(ByVal value As String)
            _StartTime = value
        End Set
    End Property

    Private _EndTime As String
    Public Property EndTime() As String
        Get
            Return _EndTime
        End Get
        Set(ByVal value As String)
            _EndTime = value
        End Set
    End Property

    Private _CallType As String
    Public Property CallType() As String
        Get
            Return _CallType
        End Get
        Set(ByVal value As String)
            _CallType = value
        End Set
    End Property

    Private _NameType As String
    Public Property NameType() As String
        Get
            Return _NameType
        End Get
        Set(ByVal value As String)
            _NameType = value
        End Set
    End Property

    Public ReadOnly Property Duration() As String
        Get
            Return Util.TimeSpanFormat(CDate(Me.StartTime), CDate(Me.EndTime))
        End Get
    End Property

End Class
